//
//  VPTimer.h
//  teacherSecretary
//
//  Created by verne on 16/6/23.
//  Copyright © 2016年 vernepung. All rights reserved.
//

#import <Foundation/Foundation.h>
@protocol VPTimerDelegate;
@interface VPTimer : NSObject
@property (weak, nonatomic) id<VPTimerDelegate> delegate;
@property (assign, nonatomic, readonly) NSTimeInterval timeInterval;
@property (assign, nonatomic, readonly) NSTimeInterval totalTimeInterval;
@property (assign, nonatomic, readonly) NSTimeInterval remainingTimeInterval;
@property (assign, nonatomic, readonly) BOOL isVaild;
- (instancetype)initWithTimeInterval:(NSTimeInterval)timeInterval totalTimeInterval:(NSTimeInterval)totalTimeInterval;
- (void)fire;
- (void)invalidate;
@end

@protocol VPTimerDelegate <NSObject>

- (void)timerEventHandler:(VPTimer *)timer;

@optional
/**
 *  执行完成 / 被手动注销
 */
- (void)timerCompleted;
@end


